<?php
include_once 'includes/db_connect.php';
include_once 'includes/functions.php';
 
sec_session_start();
 
if (login_check($mysqli) == true) {
    $loggedIn = true;
} else {
    $loggedIn = false;
    header('Location: login.php');
}
?>

<?php
if (isset($_GET['error'])) {
    echo '<p class="error">Error Logging In!</p>';
}
?>
<header id="header">
    <a href="index.php"><img id="logo" src="resources/images/myshoppinglist-logo.png"></a>
    <input id="logout-btn" class="flex-end" type="button" value="Logout" onclick="location.href='includes/logout.php'"/>
</header>